package imnu.th.stop;

import javafx.scene.transform.Scale;

import java.util.Scanner;

/**
 * @author: lys
 * @类名: Test01
 * @Title:
 * @date: 2020/7/22
 **/
public class Test01 {
    public static void main(String[] args) {
        Thread th = new MyThread("lll");
        th.start();
        System.out.println("如果停止运行，请输入：s");
        Scanner sc = new Scanner(System.in);
        String stopped = sc.next();
        if (stopped.trim().equalsIgnoreCase("s")){
            ((MyThread)th).setStopped(true);
        }
    }
}
